<template>
    <el-header class="header">
			<div class="side">
				<span>
						<img src="../assets/images/logo.png" alt="">
				</span>
				<span style="padding-left: 10px;font-size:14px">优加健康后台管理系统</span>
			</div>
			<div class="side">
				<span style="padding-right: 10px">{{uname}}</span>
				<el-button plain @click="exit()">退出</el-button>
			</div>
		</el-header>
</template>
<script>
    export default {
        data() {
            return {
                name: 'default'
            }
        },
        props:{
						uname: {
							type: String,
							default: '无'
						}
					},
        methods:{
            exit(){
				sessionStorage.clear()
                this.$router.push('/login')
            }
        }
    }
</script>
<style lang="less" scoped>
@import url("./../assets/less/color.less");
	.header{
    height: 50px;
    background: @headerColor;
    width: 100%;
		position: fixed;
		align-items: center;
		justify-content: space-between;
		display: flex;
		color: #fff;
		top: 0;
		z-index: 888;
		.side{
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
	}
	img{
		width: 80px;
	}
</style>
